package test;

import java.net.InetSocketAddress;
import java.net.SocketAddress;
import com.whlilong.jxc.mina.exchange.MessageExchange;
import com.whlilong.jxc.service.exchange.IMesssage;
import com.whlilong.jxc.service.exchange.ITransferMessage;

public class MinaClient {
	@SuppressWarnings("serial")
	public static void main(String[] args) {
		// 创建客户端连接器.
		MessageExchange mssage = new MessageExchange();
		mssage.sendMessage(new IMesssage() {
			
			@Override
			public void setITransferMessage(ITransferMessage transferMessage) {
			
			}
			
			@Override
			public ITransferMessage getITransferMessage() {
				TransferMessage mssage = new TransferMessage();
				mssage.setMessageBody("dddddddddddddd");
				return mssage;
			}
			
			@Override
			public long getConnectTimeout() {
				return 100000;
			}
			
			@Override
			public SocketAddress getConnectSocketAddress() {
				// TODO Auto-generated method stub
				return new InetSocketAddress("127.0.0.1",10000);
			}
		});
		System.exit(0);
	}

	
	
}